Skip to content

Comments

feat: add country comparison dashboard page#156

Open
saurabh12nxf wants to merge 1 commit intom-lab:mainfrom
saurabh12nxf:feat/country-comparison-dashboard
Open

feat: add country comparison dashboard page#156
saurabh12nxf wants to merge 1 commit intom-lab:mainfrom
saurabh12nxf:feat/country-comparison-dashboard

Conversation

@saurabh12nxf
Copy link

Summary

Adds a new Streamlit dashboard page (prototype/pages/Country_Compare.py) that
allows users to compare internet quality metrics across multiple countries
side-by-side.

Features

  • Period selector — choose which cached data period to compare
  • Country multiselect — pick up to 6 countries (defaults: US, DE, JP, BR)
  • Percentile selector — p1 through p99 (default: p50 median)
  • 2×2 bar chart grid — download speed, upload speed, latency, packet loss
  • Percentile distribution chart — line chart showing how a metric varies
    across all percentiles for each selected country
  • Summary table — all metrics and sample counts in a tabular format

Design Decisions

  • Uses pre-computed cache data from prototype/cache/v0/ (JSON files per
    country/period), consistent with the existing data flow
  • Reuses pycountry for country name lookups (same pattern as IQB_Map.py)
  • Uses plotly for all visualizations (project standard)
  • Auto-discovered by Streamlit as a sidebar page — no config changes needed

Testing

  • Verified Streamlit server runs with no errors on the new page
  • All 290 existing tests pass (no regressions)

@bassosimone
Copy link
Collaborator

This feels like a self contained surgical improvement. Thank you! I will take a look when possible and coordinate with my colleagues with respect to merging or requesting changes.

@bassosimone
Copy link
Collaborator

Also, this pull request seems to incorporate changes from your previous PR. In such a cases, I recommend mentioning that the two are basically stacked onto each other.

@saurabh12nxf saurabh12nxf force-pushed the feat/country-comparison-dashboard branch from 3068c14 to f73a243 Compare February 20, 2026 15:28
@saurabh12nxf
Copy link
Author

saurabh12nxf commented Feb 20, 2026

Thanks @bassosimone! You're right - the previous version had a second commit that modified

Home.py and ui_components.py, which overlapped with other work.
I've force-pushed to clean this up. The PR now contains a single commit with only the new
Country_Compare.py file - fully self-contained, no overlap with any other PR.

The deprecation fix for Home.py and ui_components.py
(use_container_width → width="stretch") will be submitted as a separate PR. This PR is independent and can be merged on its own.

@bassosimone
Copy link
Collaborator

After listing our project for GSoC, we received a large amount of pull requests across several repositories. We are dealing with the backlog, but this would take time. We will get back to this pull request eventually. In the meanwhile, if you are a GSoC applicant, please read our updated GSoC policy: https://github.com/m-lab/gsoc/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants